<template>
  <div>
    <el-form ref="ruleForm"
      :model="form"
      :rules="rules"
      label-width="100px">
      <el-form-item label="提问标题："
        prop="title">
        <el-input v-model="form.title"
          placeholder="请输入"
          :disabled="isLook=='look'" />
      </el-form-item>
      <el-form-item label="提问类型："
        prop="type">
        <el-radio-group v-model="form.type"
          :disabled="isLook=='look'">
          <el-radio label="科研设施"
            name="科研设施"></el-radio>
          <el-radio label="仪器设备"
            name="仪器设备"></el-radio>
          <el-radio label="软件系统"
            name="软件系统"></el-radio>
          <el-radio label="政策法规"
            name="政策法规"></el-radio>
          <el-radio label="反馈问题"
            name="反馈问题"></el-radio>
          <el-radio label="平台建设"
            name="平台建设"></el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="提问人："
        prop="name">
        <el-input v-model="form.name"
          placeholder="请输入"
          :disabled="isLook=='look'" />
      </el-form-item>
      <el-form-item label="提问时间："
        prop="createdTime">
        <el-date-picker style="width:100%"
          v-model="form.createdTime"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="选择日期">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="提问内容："
        prop="content">
        <el-input v-model="form.content"
          type="textarea"
          rows="7"
          placeholder="请输入内容"
          :disabled="isLook=='look'" />
      </el-form-item>
      <el-form-item>
        <el-button type="primary"
          @click="onSubmit">提交</el-button>
        <el-button>取消</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {
        title: '',
        type: '',
        name: '',
        unit: '',
        createdTime: '',
        content: '',
        replyContent: ''
      },
      rules: {
        title: [{ required: true, message: '标题不能为空！', trigger: 'blur' }],
        type: [{ required: true, message: '类型不能为空！', trigger: 'blur' }],
        name: [{ required: true, message: '内容不能为空！', trigger: 'blur' }],
        createdTime: [
          { required: true, message: '内容不能为空！', trigger: 'blur' }
        ],
        content: [{ required: true, message: '请上传', trigger: 'blur' }],
        replyContent: [{ required: true, message: '请上传', trigger: 'blur' }]
      }
    }
  },
  methods: {}
}
</script>

<style lang="less" scoped>
</style>